﻿CREATE PROCEDURE [dbo].[smenu_TrackerRequest_CarMustHaveTracker]
	@TrackerRequestID int
AS
SET NOCOUNT ON

IF EXISTS(SELECT * FROM t_Tracker_Car tc INNER JOIN t_TrackerRequest tr ON tc.VIN = tr.VIN WHERE tr.ID = @TrackerRequestID)RETURN

ROLLBACK TRAN
RAISERROR('Car doesn''t have any trackers installed!',16,1)

